package com.spzx.product.api.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.spzx.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
@Schema(description = "商品分类")
public class Category extends BaseEntity {
    private String name;


    private String imageUrl;


    private Long parentId;


    @Schema(description = "是否显示[0-不显示，1-显示]")
    private Integer status;


    private Integer orderNum;

    @TableField(exist = false)
    @Schema(description = "扩展字段：是否存在下一级分类")
    private boolean hasChildren;

    @TableField(exist = false)
    @Schema(description = "扩展字段：当前分类的下一级分类集合")
    private List<Category> children;

}
